Let $p$ be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of $5$ heads before one encounters a run of $2$ tails. Given that $p$ can be written in the form $m/n$ where $m$ and $n$ are relatively prime positive integers, find $m+n$.

Solution: Think of the problem as a sequence of H's and T's. No two T's can occur in a row, so the sequence is blocks of $1$ to $4$ H's separated by T's and ending in $5$ H's. Since the first letter could be T or the sequence could start with a block of H's, the total probability is that $3/2$ of it has to start with an H.
The answer to the problem is then the sum of all numbers of the form $\frac 32 \left( \frac 1{2^a} \cdot \frac 12 \cdot \frac 1{2^b} \cdot \frac 12 \cdot \frac 1{2^c} \cdots \right) \cdot \left(\frac 12\right)^5$, where $a,b,c \ldots$ are all numbers $1-4$, since the blocks of H's can range from $1-4$ in length. The sum of all numbers of the form $(1/2)^a$ is $1/2+1/4+1/8+1/16=15/16$, so if there are n blocks of H's before the final five H's, the answer can be rewritten as the sum of all numbers of the form $\frac 32\left( \left(\frac {15}{16}\right)^n \cdot \left(\frac 12\right)^n \right) \cdot \left(\frac 1{32}\right)=\frac 3{64}\left(\frac{15}{32}\right)^n$, where $n$ ranges from $0$ to $\infty$, since that's how many blocks of H's there can be before the final five. This is an infinite geometric series whose sum is $\frac{3/64}{1-(15/32)}=\frac{3}{34}$, so the answer is $\boxed{37}$.